package cn.aitrox.ry.service.auth.api;

import cn.aitrox.ry.bean.CommonPageInfo;
import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.auth.dto.role.in.AuthRoleCreateInDto;
import cn.aitrox.ry.service.auth.dto.role.in.AuthRoleSearchInDto;
import cn.aitrox.ry.service.auth.dto.role.in.AuthRoleUpdateInDto;
import cn.aitrox.ry.service.auth.dto.role.out.AuthRoleDetailDto;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface AuthRoleApi {


    @PostMapping(value = "/auth/role")
    RespResult<Integer> create(@RequestBody AuthRoleCreateInDto input);

    @PutMapping(value = "/auth/role")
    RespResult update(@RequestBody AuthRoleUpdateInDto input);

    @GetMapping(value = "/auth/role/{id}")
    RespResult<AuthRoleDetailDto> read(@PathVariable("id") Integer id);

    @DeleteMapping(value = "/auth/role/{id}")
    RespResult delete(@PathVariable("id") Integer id);

    @PostMapping(value = "/auth/role/search")
    CommonPageInfo<AuthRoleDetailDto> search(@RequestBody AuthRoleSearchInDto input);
}
